﻿<!DOCTYPE html>
<!--[if IE 8]> <html lang="en" class="ie8"> <![endif]-->
<!--[if IE 9]> <html lang="en" class="ie9"> <![endif]-->
<!--[if !IE]><!--> <html lang="en"> <!--<![endif]-->

<!-- BEGIN HEAD -->
<head>
     <meta charset="UTF-8" />
    <title>BCORE Admin Dashboard Template | Login Page</title>
    <meta content="width=device-width, initial-scale=1.0" name="viewport" />
	<meta content="" name="description" />
	<meta content="" name="author" />
     <!--[if IE]>
        <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
        <![endif]-->
    <!-- GLOBAL STYLES -->
     <!-- PAGE LEVEL STYLES -->
     <link rel="stylesheet" href="__PUBLIC__/assets/plugins/bootstrap/css/bootstrap.css" />
    <link rel="stylesheet" href="__PUBLIC__/assets/css/login.css" />
    <link rel="stylesheet" href="__PUBLIC__/assets/plugins/magic/magic.css" />
    <script src="__PUBLIC__/js/jquery.min.js"></script>
     <!-- END PAGE LEVEL STYLES -->
   <!-- HTML5 shim and Respond.js IE8 support of HTML5 elements and media queries -->
    <!--[if lt IE 9]>
      <script src="https://oss.maxcdn.com/libs/html5shiv/3.7.0/html5shiv.js"></script>
      <script src="https://oss.maxcdn.com/libs/respond.js/1.3.0/respond.min.js"></script>
    <![endif]-->
</head>
    <!-- END HEAD -->

    <!-- BEGIN BODY -->
<body >

   <!-- PAGE CONTENT --> 
    <div class="container">
    <div class="text-center">
        <img src="__PUBLIC__/assets/img/logo.png" id="logoimg" alt=" Logo" />
    </div>
    <div class="tab-content">
        <div id="login" class="tab-pane active">
            <form action="<{:U('AdminLogin/login')}>" name="getForm" method="post" class="form-signin">
                <h3 class="text-muted text-center ">后台登录</h3>
                   
               
                <input type="text" placeholder="Username" name="name" class="form-control" /><span class="sname"></span>
                <input type="password" placeholder="Password" name="pwd" class="form-control" /><span class="spwd"></span><br>
                <button class="btn text-muted text-center btn-success" type="submit"> 登 &nbsp; &nbsp; &nbsp; 录 </button>
            </form>
        </div>
        <div id="forgot" class="tab-pane">
            <form action="index.html" class="form-signin">
                <p class="text-muted text-center btn-block btn btn-primary btn-rect">Enter your valid e-mail</p>
                <input type="email"  required="required" placeholder="Your E-mail"  class="form-control" />
                <br />
                <button class="btn text-muted text-center btn-success" type="submit">Recover Password</button>
            </form>
        </div>
        <div id="signup" class="tab-pane">
            <form action="index.html" class="form-signin">
                <p class="text-muted text-center btn-block btn btn-primary btn-rect">Please Fill Details To Register</p>
                 <input type="text" placeholder="First Name" class="form-control" />
                 <input type="text" placeholder="Last Name" class="form-control" />
                <input type="text" placeholder="Username" class="form-control" />
                <input type="email" placeholder="Your E-mail" class="form-control" />
                <input type="password" placeholder="password" class="form-control" />
                <input type="password" placeholder="Re type password" class="form-control" />
                <button class="btn text-muted text-center btn-success" type="submit">Register</button>
            </form>
        </div>
    </div>
    <div class="text-center">
        <ul class="list-inline">
           <!-- 入口形式有误 -->
            <li><a class="text-muted" href="<{:U('Home@Index/index')}>" data-toggle="tab">会员入口</a></li>
          
        </ul>
    </div>

</div>
          <script type="text/javascript">
               $(function(){

                      //验证登录用户名
               var name = document.getForm.name;
               name.onblur = zhanghao;
                function zhanghao(){
                       var name1 = document.getForm.name.value;
                          if (name1 == '') {
                                $('#login .sname').css('color','red').html('请输入用户名');
                                return false;
                            }else{
                                 $('#login .sname').css('color','red').html('');
                                 return true;
                            }
                         }

               //验证登录密码
               var pwd = document.getForm.pwd;
               pwd.onblur = mimaa;
               function mimaa(){
                    var pwd1 = document.getForm.pwd.value;
                      if (pwd1 == '') {
                    $('#login .spwd').css('color','red').html('请输入密码');
                      return false;
                  }else{
                     $('#login .spwd').css('color','red').html('');
                      return true;
                  }
               }

                   //验证验证码
                var vcode = document.getForm.vcode;
                vcode.onblur = yzm1;
                function yzm1(){
                    $.ajax({
                   type:'post',
                   url:"<{:U('Home/Login/yzm')}>",
                   success:function(data){
                       var vcodee1 = document.getForm.vcode.value;
                       if (data != vcodee1) {
                      $('#login .svcode').css('color','red').html(' 验证码错误');
                       return false;
                       }  else{
                        $('#login .svcode').css('color','red').html('');
                          return true;
                       }

                          },
              })
                    // return false;  
        }

        $('#login form').submit(function(){
             return zhanghao() && mimaa() && yzm1();
        })

   })


          </script>

	  <!--END PAGE CONTENT -->     
	      
      <!-- PAGE LEVEL SCRIPTS -->
      <script src="__PUBLIC__/assets/plugins/jquery-2.0.3.min.js"></script>
      <script src="__PUBLIC__/assets/plugins/bootstrap/js/bootstrap.js"></script>
   <script src="__PUBLIC__/assets/js/login.js"></script>
      <!--END PAGE LEVEL SCRIPTS -->

</body>
    <!-- END BODY -->
</html>
